import http from '@/api/request.js'

//文章列表
export default function () {
    return {
        //获取文章列表
        getArticleList: (data) => {
            return http.post('/backend/admin/article/list', data)
        },
        //获取文章详情
        getArticleDetail: (data) => {
            return http.post('/backend/admin/article/detail', data)
        },
        //添加文章
        addArticle: (data) => {
            return http.post('/backend/admin/article/create', data)
        },
        //编辑文章
        editArticle: (data) => {
            return http.post('/backend/admin/article/update', data)
        },
        //删除文章
        deleteArticle: (data) => {
            return http.post('/backend/admin/article/delete', data)
        },
    }
}
